namespace PF {
    export function JumpPointFinder(opt) {
        opt = opt || {};
        if (opt.diagonalMovement === DiagonalMovement.Never) {
            return new JPFNeverMoveDiagonally(opt);
        } else if (opt.diagonalMovement === DiagonalMovement.Always) {
            return new JPFAlwaysMoveDiagonally(opt);
        } else if (opt.diagonalMovement === DiagonalMovement.OnlyWhenNoObstacles) {
            return new JPFMoveDiagonallyIfNoObstacles(opt);
        } else {
            return new JPFMoveDiagonallyIfAtMostOneObstacle(opt);
        }
    }
}